package com.zh.freechat.domain.message.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zh.webcommon.common.auditor.mp.SimpleEntity;
import lombok.Getter;
import lombok.Setter;

import java.util.List;

/**
 * 群组PO
 */
@Getter
@Setter
@TableName(value = "ch_group", autoResultMap = true)
public class ChatGroupPO extends SimpleEntity {
    /**
     * ID
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 群号，用于搜索、添加成员等
     */
    private String groupNo;

    /**
     * 群名称
     */
    private String name;

    /**
     * 群头像
     */
    private String avatar;

    /**
     * 群主uid
     */
    private String ownerUid;
    /**
     * 群组成员list
     */
    @TableField(exist = false)
    private List<GroupMemberPO> users;

    public ChatGroupPO() {
    }

}
